package com.core.zyyz.pcmc.service.impl;

import java.util.List;

import com.core.zyyz.pcmc.domain.PcmcDataPermissionRule;
import com.core.zyyz.pcmc.mapper.PcmcDataPermissionRuleMapper;
import com.core.zyyz.pcmc.service.PcmcDataPermissionRuleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;



/**
 * 数据权限规则Service业务层处理
 *
 * @author core
 * @date 2024-10-17
 */
@Service
public class PcmcDataPermissionRuleServiceImpl implements PcmcDataPermissionRuleService
{
    @Autowired
    private PcmcDataPermissionRuleMapper pcmcDataPermissionRuleMapper;

    /**
     * 查询数据权限规则
     *
     * @param ruleId 数据权限规则主键
     * @return 数据权限规则
     */
    @Override
    public PcmcDataPermissionRule selectPcmcDataPermissionRuleByRuleId(Long ruleId)
    {
        return pcmcDataPermissionRuleMapper.selectPcmcDataPermissionRuleByRuleId(ruleId);
    }

    /**
     * 查询数据权限规则列表
     *
     * @param pcmcDataPermissionRule 数据权限规则
     * @return 数据权限规则
     */
    @Override
    public List<PcmcDataPermissionRule> selectPcmcDataPermissionRuleList(PcmcDataPermissionRule pcmcDataPermissionRule)
    {
        return pcmcDataPermissionRuleMapper.selectPcmcDataPermissionRuleList(pcmcDataPermissionRule);
    }

    /**
     * 新增数据权限规则
     *
     * @param pcmcDataPermissionRule 数据权限规则
     * @return 结果
     */
    @Override
    public int insertPcmcDataPermissionRule(PcmcDataPermissionRule pcmcDataPermissionRule)
    {
        return pcmcDataPermissionRuleMapper.insertPcmcDataPermissionRule(pcmcDataPermissionRule);
    }

    /**
     * 修改数据权限规则
     *
     * @param pcmcDataPermissionRule 数据权限规则
     * @return 结果
     */
    @Override
    public int updatePcmcDataPermissionRule(PcmcDataPermissionRule pcmcDataPermissionRule)
    {
        return pcmcDataPermissionRuleMapper.updatePcmcDataPermissionRule(pcmcDataPermissionRule);
    }

    /**
     * 批量删除数据权限规则
     *
     * @param ruleIds 需要删除的数据权限规则主键
     * @return 结果
     */
    @Override
    public int deletePcmcDataPermissionRuleByRuleIds(Long[] ruleIds)
    {
        return pcmcDataPermissionRuleMapper.deletePcmcDataPermissionRuleByRuleIds(ruleIds);
    }

    /**
     * 删除数据权限规则信息
     *
     * @param ruleId 数据权限规则主键
     * @return 结果
     */
    @Override
    public int deletePcmcDataPermissionRuleByRuleId(Long ruleId)
    {
        return pcmcDataPermissionRuleMapper.deletePcmcDataPermissionRuleByRuleId(ruleId);
    }
}
